package com.gxl.design.proxypattern.proxy;

import com.gxl.design.proxypattern.Login;
import com.gxl.design.proxypattern.LoginImpl;

public class ProxyLogin implements Login {
    private Login login;
    String accout;
    String pwd;

    public ProxyLogin(){}

    @Override
    public String login(String accout, String pwd) {
        if (accout==null||accout.equals("")||pwd==null||pwd.equals("")){
            System.out.println("账号密码格式不正确!");
            return "账号密码格式不正确!";
        }
        login = new LoginImpl();
        return login.login(accout, pwd);
    }
}
